package dk.mirasola.systemtraining.biddingsession.shared.service;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import dk.mirasola.systemtraining.biddingsession.shared.transfer.BidBoardTO;
import dk.mirasola.systemtraining.biddingsession.shared.transfer.BidInitDataTO;
import dk.mirasola.systemtraining.biddingsession.shared.transfer.FinishBoardTO;
import dk.mirasola.systemtraining.biddingsession.shared.transfer.FinishInitDataTO;
import dk.mirasola.systemtraining.biddingsession.shared.transfer.MakeBidResultTO;
import dk.mirasola.systemtraining.biddingsession.shared.transfer.StartSessionTO;
import dk.mirasola.systemtraining.bridgewidgets.shared.model.Bid;

@RemoteServiceRelativePath("session.rpc")
public interface SessionService extends RemoteService {
    StartSessionTO startSession(String sessionId) throws SessionNotFoundException;

    BidInitDataTO getBidInitData(String biddingSetId);

    FinishInitDataTO getFinishInitData(String biddingSetId);

    MakeBidResultTO makeBid(String boardId, Bid bid);

    BidBoardTO getBidBoard(String boardId);

    FinishBoardTO getFinishBoard(String boardId);

    void addComment(String boardId, String comment);

    BidBoardTO undoBid(String boardId);
}
